<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-type" content="text/html; charset=utf-8">
		<title>Loading FoxTorrent</title>
		
		<script type="text/javascript" charset="utf-8">
			
			var gotResponse = false;
			var spinMap = {"|": "/", "/": "-", "-": "\\", "\\": "|"}
			
			function checkSwoosh(){
				if(gotResponse) return;
				if(document.getElementById("checkScript"))
					document.getElementById("checkScript").parentNode.removeChild(document.getElementById("checkScript"));
				var script = document.createElement("script");
				script.id = "checkScript";
				script.src = "http://127.0.0.1:9421/api?cid=2&function=ping&wrapper=relocate(*)";
				document.getElementsByTagName("head")[0].appendChild(script);
				setTimeout(checkSwoosh, 1000);
			}
			
			function relocate(){
				gotResponse = true;
				window.location = "FoxTorrent2.swf";
			}
			
			function spin(){
				var s = document.getElementById("spinner");
				if(s) s.innerHTML = spinMap[s.innerHTML];
				setTimeout(spin, 125);
			}
			
			checkSwoosh();
			setTimeout(spin, 125);
			
		</script>
		
		<style type="text/css" media="screen">
			
			#main, #spinner{
				text-align: center;
				margin-left: auto;
				margin-right: auto;
				margin-top: 150px;
				font-size: 16px;
				font-weight: bold;
				font-family: Verdana, Arial, sans-serif;
			}
			
			#spinner{
				margin-top: 20px;
				font-family: monospace;
				font-size: 18px;
			}
			
		</style>
		
	</head>
	<body>
		<div id="main">Initializing FoxTorrent... one moment please.</div>
		<div id="spinner">/</div>
	</body>
</html>